package com.yantong.pojo;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 佣金流水记录
 *
 * @author kanghaixin
 */
public class CommissionLog implements Serializable {

	/**
	 * 优惠券id
	 */
	private Long ticketId;
	/**
	 * 门店id
	 */
	private Long teamId;
	/**
	 * 缩略图
	 */
	private String thumbSquare;
	/**
	 * 商品主图
	 */
	private String thumb;
	private String unit;
	private String specTitle;
	/**
	 * 数量
	 */
	private Integer total;
	/**
	 * 现价
	 */
	private BigDecimal marketPrice;
	/**
	 * 会员图像
	 */
	private String avatar;
	/**
	 * 订单状态
	 */
	private Integer orderStatus;
	/**
	 * 商品名称
	 */
	private String productName;
	/**
	 * 规格名称
	 */
	private String optionName;
	/**
	 * 订单状态名称
	 */
	private String orderStatusName;
	/**
	 * 会员昵称
	 */
	private String nickname;
	/**
	 * 姓名
	 */
	private String realname;
	/**
	 * 订单SN
	 */
	private String orderSn;
	/**
	 * 主键
	 */
	private Long id;
	/**
	 * 会员ID
	 */
	private Long mid;
	/**
	 * 订单ID
	 */
	private Long orderId;
	/**
	 * 订单商品ID
	 */
	private Long orderProductId;
	/**
	 * 佣金来源1-订单，2-推荐
	 */
	private Integer type;
	/**
	 * 佣金金额
	 */
	private BigDecimal commission;

	/**
	 * 退款减去分佣
	 */
	private BigDecimal refundCommission;
	/**
	 * 创建时间
	 */
	private Date createTime;
	/**
	 * 是否已发放 0-未  1-已
	 */
	private Integer isGrant;
	/**
	 * 发放人ID
	 */
	private Long grantId;
	/**
	 * 发放人姓名
	 */
	private String grantName;
	/**
	 * 发送时间
	 */
	private Date grantTime;
	/**
	 * 是否已删除
	 */
	private Integer del;

	/**
	 * 商品单金额
	 */
	private BigDecimal headcommission;

	private String name;
	/**
	 * 服中心
	 */
	private Long centreId;

	//是否激活的佣金记录，不激活就不会发放
	private Integer isActive;


	public CommissionLog(Long mid, Long orderId, Long orderProductId, Integer type, BigDecimal commission, Long centreId) {
		this.mid = mid;
		this.orderId = orderId;
		this.orderProductId = orderProductId;
		this.type = type;
		this.commission = commission;
		this.centreId = centreId;
	}

	public CommissionLog(Long mid, Long orderId, Long orderProductId, Integer type, BigDecimal commission, Long centreId, Long ticketId) {
		this.mid = mid;
		this.orderId = orderId;
		this.orderProductId = orderProductId;
		this.type = type;
		this.commission = commission;
		this.centreId = centreId;
		this.ticketId = ticketId;
	}
	public CommissionLog(){
	}

	public Long getTicketId() {
		return ticketId;
	}

	public void setTicketId(Long ticketId) {
		this.ticketId = ticketId;
	}

	public Long getTeamId() {
		return teamId;
	}

	public void setTeamId(Long teamId) {
		this.teamId = teamId;
	}

	public Integer getIsActive() {
		return isActive;
	}

	public void setIsActive(Integer isActive) {
		this.isActive = isActive;
	}

	public BigDecimal getRefundCommission() {
		return refundCommission;
	}

	public void setRefundCommission(BigDecimal refundCommission) {
		this.refundCommission = refundCommission;
	}

	private String typeName;

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public BigDecimal getHeadcommission() {
		return headcommission;
	}


	public void setHeadcommission(BigDecimal headcommission) {
		this.headcommission = headcommission;
	}

	public String getThumbSquare() {
		return thumbSquare;
	}

	public void setThumbSquare(String thumbSquare) {
		this.thumbSquare = thumbSquare;
	}

	public String getThumb() {
		return thumb;
	}

	public void setThumb(String thumb) {
		this.thumb = thumb;
	}

	public Integer getTotal() {
		return total;
	}

	public void setTotal(Integer total) {
		this.total = total;
	}

	public BigDecimal getMarketPrice() {
		return marketPrice;
	}

	public void setMarketPrice(BigDecimal marketPrice) {
		this.marketPrice = marketPrice;
	}

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public Integer getOrderStatus() {
		return orderStatus;
	}

	public void setOrderStatus(Integer orderStatus) {
		this.orderStatus = orderStatus;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public String getOrderStatusName() {
		return orderStatusName;
	}

	public void setOrderStatusName(String orderStatusName) {
		this.orderStatusName = orderStatusName;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getRealname() {
		return realname;
	}

	public void setRealname(String realname) {
		this.realname = realname;
	}

	public String getOrderSn() {
		return orderSn;
	}

	public void setOrderSn(String orderSn) {
		this.orderSn = orderSn;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getMid() {
		return mid;
	}

	public void setMid(Long mid) {
		this.mid = mid;
	}

	public Long getOrderId() {
		return orderId;
	}

	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}

	public Long getOrderProductId() {
		return orderProductId;
	}

	public void setOrderProductId(Long orderProductId) {
		this.orderProductId = orderProductId;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public BigDecimal getCommission() {
		return commission;
	}

	public void setCommission(BigDecimal commission) {
		this.commission = commission;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Integer getIsGrant() {
		return isGrant;
	}

	public void setIsGrant(Integer isGrant) {
		this.isGrant = isGrant;
	}

	public Long getGrantId() {
		return grantId;
	}

	public void setGrantId(Long grantId) {
		this.grantId = grantId;
	}

	public String getGrantName() {
		return grantName;
	}

	public void setGrantName(String grantName) {
		this.grantName = grantName == null ? null : grantName.trim();
	}

	public Date getGrantTime() {
		return grantTime;
	}

	public void setGrantTime(Date grantTime) {
		this.grantTime = grantTime;
	}

	public Integer getDel() {
		return del;
	}

	public void setDel(Integer del) {
		this.del = del;
	}

	public Long getCentreId() {
		return centreId;
	}

	public void setCentreId(Long centreId) {
		this.centreId = centreId;
	}

	public String getOptionName() {
		return optionName;
	}

	public void setOptionName(String optionName) {
		this.optionName = optionName;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public String getSpecTitle() {
		return specTitle;
	}

	public void setSpecTitle(String specTitle) {
		this.specTitle = specTitle;
	}
}